<?php
namespace app\controllers\api\fans;

use fate\http\Request;

use app\models\Fans;

class FanscountController extends \fate\web\PureController {

    public function run() {
        $req = Request::getInstance();
        $uid = $req->getParameter('uid');

        if(!is_numeric($uid)) {
            $this->ajaxReturn(null, 300002);
            exit;
        }

        $ret = (new Fans())->fansNumber($uid);
        $this->ajaxReturn([
            'fans' => $ret
        ]);
    }

}
